package com.tool_stdy.concurrent;

import java.util.concurrent.locks.LockSupport;

/**
 * Created by yan_li on 2016/1/24.
 */
public class LockSupportTest implements Runnable {
    @Override
    public void run() {
        System.out.println("线程:"+Thread.currentThread().getName()+" do");
        LockSupport.park();
        System.out.println("ddd");
        System.out.println(Thread.interrupted());
    }

    public static void main(String[] args) {
        LockSupportTest test = new LockSupportTest();
        Thread t1 = new Thread(test);
        t1.start();
        //LockSupport.unpark(t1);
        t1.interrupt();
    }
}
